package com.sbxBase.controller;

import com.sbxBase.entity.FriendSearchUser;
import com.sbxBase.service.FriendsService;
import com.common.entity.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

@Api(tags = "好友")
@RestController
@RequestMapping("/friends")
public class FriendsController {

    @Resource
    private FriendsService friendsService;


    @GetMapping("/search")
    @ApiOperation("搜索人")
    public Result searchFriendsPage(FriendSearchUser friendSearchUser) {
        return Result.page(friendsService.searchFriendsPage(friendSearchUser));
    }


    @DeleteMapping
    @ApiOperation("删除朋友")
    public Result delFriends(String friendId) {
        friendsService.delFriends(friendId);
        return Result.success();
    }






}
